package com.study.money;

import org.apache.commons.lang3.tuple.Pair;

import java.util.Date;

/**
 * TODO
 *
 * @author wanghuilong
 * @version 1.0
 * @date 2022/2/9 3:18 下午
 */
public class Test2 {

    public static void main(String[] args) {


        //净值估算 "gsz"
//        long time = System.currentTimeMillis();
//        String code = "010990";
//
//        String url = "https://fundgz.1234567.com.cn/js/"+code+".js?rt="+time;
//
//        String s = HttpUtils.get(url);
//        s = s.replace("jsonpgz(","").replace(");","");
//        JSONObject jsonObject = JSONObject.parseObject(s);
//        System.out.println(jsonObject.get("gsz"));

        Date date = new Date();
        for (Test1.TimeTypeEnum timeTypeEnum : Test1.timeTypeEnumList) {
            Pair<String, String> startEndTime = Test1.getStartEndTime(date, timeTypeEnum);
            System.out.println("----- " + startEndTime.getLeft() + " ~ " + startEndTime.getRight() + " " + timeTypeEnum.name() + " :");
        }
    }

}
